using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NCS.Module.Multimedia.Library.Bonus;
using NCS.Module.Multimedia.Library.Providers;

namespace NCS.Module.Multimedia.Library.Bonus
{
    public class Gallery_BonusController
    {
        public static DataTable GetBonus()
        {
            return DataAccessProvider.instance().GetBonus();
        }
        public static DataTable GetAllBonus()
        {
            return DataAccessProvider.instance().GetAllBonus();
        }
        public static DataTable GetAllBonusByKey(string txtSearch, DateTime fromdate, DateTime todate, int userid)
        {
            return DataAccessProvider.instance().GetAllBonusByKey(txtSearch, fromdate, todate, userid);
        }
        public static DataTable GetAllBonusByNum(int num)
        {
            return DataAccessProvider.instance().GetAllBonusByNum(num);
        }
        
        public static DataTable GetTopBonus(int num, int type)
        {
            return DataAccessProvider.instance().GetTopBonus(num, type);
        }
        public static DataTable GetAllCateBonusID(int catebonusid)
        {
            return DataAccessProvider.instance().GetAllCateBonusID(catebonusid);    
        }
        public static DataTable GetTopBonus(int portalid, int pagesize, int currpage, out int totalRecord, int type)
        {
            return DataAccessProvider.instance().GetTopBonus(portalid, pagesize, currpage, out totalRecord, type);
        }
        public static void SetBonusIndex(int id, int index)
        {
            DataAccessProvider.instance().SetBonusIndex(id, index);
        }

        public static void SetBonusRank(int id, int rank)
        {
            DataAccessProvider.instance().SetBonusRank(id, rank);
        }

        public static void SetBonusStatus(int id, bool status)
        {
            DataAccessProvider.instance().SetBonusStatus(id, status);
        }

        public static void DeleteBonus(int _bonus_ID)
        {
            DataAccessProvider.instance().DeleteBonus(_bonus_ID);
        }

        public static int InsertBonus(Gallery_BonusInfo _bonusInfo)
        {
            return DataAccessProvider.instance().InsertBonus(_bonusInfo);
        }

        public static void UpdateBonus(Gallery_BonusInfo _bonusInfo)
        {
            DataAccessProvider.instance().UpdateBonus(_bonusInfo);
        }

        public static Gallery_BonusInfo GetBonus(int _bonus_ID)
        {
            return DataAccessProvider.instance().GetBonus(_bonus_ID);
        }

    }

}
